module.exports = {
  chainWebpack: (config) => {
    config
      .plugin('html')
      .tap((args) => {
        args[0].title = '网抑云音乐';
        return args;
      });
  },
  lintOnSave: false,
  devServer: {
    proxy: {
      '/neteaseCloudMusicApi': {
        target: `http://localhost:3000/`,
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/neteaseCloudMusicApi': ''
        }
      },
      '/server': {
        target: `http://localhost:7001/`,
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/server': ''
        }
      },
      '/socket.io': {
        target: 'http://127.0.0.1:7001',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/socket.io': '/socket.io'
        }
      }

    }
  }
}